<template>
  <div class="about">
    <h1>This is an about page</h1>
  </div>
</template>

<script>
// import {Search} from '@/http/interface'
export default {
  name: "About",
  data() {
    return {
      musicList:[],
      songId:1471039808
    };
  },
  created(){
    this.search()
    this.getSongUrl()
  },
  methods:{
    search(){
      let p = {
        keywords:'银临'
      }
      // console.log(Search)
      // Search(p).then(res => {
      //   console.log(res)

      // }).catch(()=>{})
      this.$api.Search(p).then(response => {
        console.log(response)
        console.log(response.result.songs)
        this.musicList = response.data.result.songs
        console.log(this.musicList)
        this.songId = this.musicList[0].id
        console.log(this.songId)
        this.getSongUrl()
      }).catch(()=>{

      })
    },
    getSongUrl(){
      let u={
        id:this.songId
      }
      console.log(this.songId)
      this.$api.SongUrl(u).then(res => {
        console.log(res)
      }).catch(()=>{})
    }
    
  }
};
</script>
